<?php
@require_once("config.php");
$neibie=$_GET["neibie"];
if($neibie==1){
    $str="select * from newinfo where neibie=1";
}else if($neibie==2){
    $str="select * from newinfo where neibie=2";
}else{
    $str="select * from newinfo where neibie=3";
}

$result=mysql_query($str);

$list=array();
while($item=mysql_fetch_array($result)){
    $temp=array();
    $temp["id"]=$item["id"];
    $temp["goodsname"]=$item["goodsname"];
    $temp["price"]=$item["price"];
    $temp["smallimg"]=$item["smallimg"];
    $list[]=$temp;
}

echo json_encode($list);

?>